-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use Vite defaults for port and strictPort #5392
Conversation
🦋 Changeset detectedLatest commit: 4076d49 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The Vite default port is insane though. 4173 or something like that and I think it's different between dev and preview making it even more confusing |
See vitejs/vite#6330 and vitejs/vite#8148 for the port defaults |
I'm torn. Yeah, those defaults are insane. Maybe as a compromise we could drop the default overrides from Kit itself, but re-add the same 3000 defaults to the starter templates? |
They chose unique ports to be associated with vite. It should be possible to provide other ports/overrides from the config hook of kit vite plugin |
Yeah 5173 and 4173 both represent I think if SvelteKit is truly a Vite plugin now, it make sense to use Vite's default config for it. |
I've literally never ctrl+clicked the URL in the terminal and din't know you could until now. Even knowing that you can, I don't think I'd do it as it'll open as a new tab in whatever window I last used, which isn't necessarily where I want to open it. I agree putting the port in the template might be better than putting it in the plugin at least though |
I don't know why we'd want to override the default in the template. Is it a weird default? Maybe. Will people get used to it? Yes. Is it hard to change? No. Just feels like an unnecessary distinction from every other Vite app |
These made sense when we were using
svelte-kit dev
etc, but I'm not sure they do any morePlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0